<?php

require_once 'src/action/aRelatorios.php';
//require_once 'src/core/Clientes.php';

$r = new aRelatorios();
/**
 * rel1
 */
if (isset($_GET['rel1'])) {
    if (isset($_POST['dtInicio']) && isset($_POST['dtFim'])) {
        $dtini = $_POST['dtInicio'];        
        $dtfim = $_POST['dtFim'];        
    } else {
        $dtini = date('d/m/Y');        
        $dtfim = date('d/m/Y');        
    }
    $result = $r->todosNomesServicosESuaRespectiva($r->dateTimeToUS($dtini), $r->dateTimeToUS($dtfim));
    include 'src/view/rel1.php';
}
/**
 * rel2
 */
if (isset($_GET['rel2'])) {
    if (isset($_POST['nomePet'])) {
        $nomePet = $_POST['nomePet'];        
    } else {
        $nomePet = "";
    }
    $result = $r->todasRacasCachorroFiltrandoPorLetraInicial($nomePet);
    include 'src/view/rel2.php';
}
/**
 * rel3
 */
if (isset($_GET['rel3'])) {
    $result = $r->rel3();
    include 'src/view/rel3.php';
}
/**
 * rel4
 */
if (isset($_GET['rel4'])) {
    $result = $r->rel4();
    include 'src/view/rel4.php';
}
/**
 * rel5
 */
if (isset($_GET['rel5'])) {
    $result = $r->rel5();
    include 'src/view/rel5.php';
}
?>